@extends('layouts.app')

@section('title','postCommentEdit')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <a class="create-return" href="{{ route('postComments.index') }}">
                    <span><i class="fa fa-chevron-circle-left fa-2x" aria-hidden="true"></i></span>
                    <span>返回</span>
                </a>

                <div class="create">
                    <div class="create-title">编辑帖子信息</div>
                        {!! Form::model($postComments, ['action' => ['PostCommentController@update',$postComments->id]]) !!}
                        <input name="_method" type="hidden" value="PATCH">
                        {{ csrf_field() }}
                        <div class="create-list{{ $errors->has('sun_picture_id')?'has-error':'' }}">
                            {!! Form::label('sun_picture_id','评论者ID：')!!}
                            {!! Form::text('sun_picture_id',$postComments->sun_picture_id)!!}
                            @if ($errors->has('sun_picture_id'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('sun_picture_id') }}</strong>
                                </span>
                            @endif
                        </div>
                        <div class="create-list{{ $errors->has('comment_content')?'has-error':'' }}">
                            {!! Form::label('comment_content','评论内容：') !!}
                            <div class="input-group">
                                {!! Form::textarea('comment_content',$postComments->comment_content) !!}
                                @if ($errors->has('comment_content'))
                                    <span class="help-block">
				                        <strong>{{ $errors->first('comment_content') }}</strong>
				                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="create-list{{ $errors->has('user_id')?'has-error':'' }}">
                            {!! Form::label('user_id','用户ID：') !!}
                            <div class="input-group">
                                {!! Form::text('user_id',$postComments->user_id) !!}
                                @if ($errors->has('user_id'))
                                    <span class="help-block">
				                        <strong>{{ $errors->first('user_id') }}</strong>
				                    </span>
                                @endif
                            </div>
                        </div>
                        {!! Form::submit('更新评论信息',['class'=>"btn btn-success"]); !!}
                        {!! Form::close() !!}
                    </div>
                    <div id="debug"></div>
            </div>
        </div>
    </div>

@endsection